package com.vichat.common.vo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class Menu implements Serializable{
	private static final long serialVersionUID = 1L;
    public Menu() {

    }
    public Menu(long menuid, String menuname, String url, String icon) {
        this.menuid = menuid;
        this.menuname = menuname;
        this.url = url;
        this.icon = icon;
    }

    public long getMenuid() {
		return menuid;
	}
	public void setMenuid(long menuid) {
		this.menuid = menuid;
	}
	public String getIcon() {
		return icon;
	}
	public void setIcon(String icon) {
		this.icon = icon;
	}
	public String getMenuname() {
		return menuname;
	}
	public void setMenuname(String menuname) {
		this.menuname = menuname;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public List<Menu> getMenus() {
		return menus;
	}
	public void setMenus(List<Menu> menus) {
		this.menus = menus;
	}
	private long menuid;
	private String icon;
	private String menuname;
	private String url;
	private List<Menu> menus;

    public boolean hasLeaf(){
        if(menus != null && menus.size() > 0){
            return true;
        }
        return false;
    }
    public void addMenu(Menu subMenu){
        if(menus == null) {
            menus = new ArrayList<Menu>();
        }
        menus.add(subMenu);
    }
}
